package class5;

import java.io.File;

public class demo2 {
    public static void main(String[] args) {

        File file=new File("D:\\C++");
        String[]list= file.list();
        for (int i = 0; i < list.length ; i++) {
            System.out.println(list[i]);
        }

        File[]lists=file.listFiles();
        for (int i = 0; i < lists.length ; i++) {
            System.out.println(lists[i]);
        }

    }
}
